<table class="TableA" width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CEE7FF">
	<tr>
		<td height="25">比赛时间</td>
		<td height="25">对阵球队</td>
		<td height="25">胜（场）</td>
		<td height="25">负（场）</td>
		<td height="25">比赛结果</td>
		<td height="25">赔率</td>
		<td height="25">球队投注</td>
		<td height="25">投注比例</td>
		<td height="25">总投注</td>
	</tr>
	<tr>
		<td height="25" rowspan="2"><?php echo date('Y-m-d H:i:s',$this->param['MatchTime'])?></td>
		<td height="25"><?php echo $this->param['TeamAN']?></td>
		<td height="25"><?php echo $this->param['WinA']?></td>
		<td height="25"><?php echo $this->param['LoseA']?></td>
		<td height="25">
			<?php
				if($this->param['MatchStatus'] == 2 || $this->param['MatchStatus'] == 3) {
					echo $this->param['TeamAScore'];
				} else {
					echo '未公布';
				}
			?>
		</td>
		<td height="25"><?php echo $this->param['TeamARate']?></td>
		<td height="25"><?php echo $this->param['ChipInA']?></td>
		<td height="25"><?php echo $this->param['ChipInARate']?></td>
		<td height="25" rowspan="2"><?php echo $this->param['ChipInTotal']?></td>
	</tr>
	<tr>
		<td height="25"><?php echo $this->param['TeamBN']?></td>
		<td height="25"><?php echo $this->param['WinB']?></td>
		<td height="25"><?php echo $this->param['LoseB']?></td>
		<td height="25">
			<?php
				if($this->param['MatchStatus'] == 2 || $this->param['MatchStatus'] == 3) {
					echo $this->param['TeamBScore'];
				} else {
					echo '未公布';
				}
			?>
		</td>
		<td height="25"><?php echo $this->param['TeamBRate']?></td>
		<td height="25"><?php echo $this->param['ChipInB']?></td>
		<td height="25"><?php echo $this->param['ChipInBRate']?></td>
	</tr>
</table>

<?php if($this->param['MatchStatus'] == 3) {?>
<table class="TableA" width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CEE7FF">
	<tr>
		<td height="25">比赛球队</td>
		<td height="25">总投注</td>
		<td height="25">返奖数</td>
		<td height="25">返还率</td>
		<td height="25">总收入</td>
		<td height="25">比赛时间</td>
	</tr>
	<tr>
		<td height="25"><?php echo $this->param['TeamAN']?> VS <?php echo $this->param['TeamBN']?></td>
		<td height="25"><?php echo $this->param['ChipInTotal']?></td>
		<td height="25"><?php echo $this->param['ReturnScore']?></td>
		<td height="25"><?php if($this->param['ChipInTotal'] == 0) { echo 0; } else { echo (round($this->param['ReturnScore']/$this->param['ChipInTotal'],0)* 100); }?>%</td>
		<td height="25"><?php echo $this->param['ChipInTotal']-$this->param['ReturnScore']?></td>
		<td height="25"><?php echo date('Y-m-d H:i:s',$this->param['MatchTime'])?></td>
	</tr>
</table>
<?php }?>

<table class="TableA" width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CEE7FF">
	<tr>
		<td colspan="5" width="100%" align="center" style="background-color: #eee">会员投注信息</td>
	</tr>
	<tr>
		<td height="25">会员ID</td>
		<td height="25">会员昵称</td>
		<td height="25">投注信息</td>
		<td height="25">得分</td>
		<td height="25">状态</td>
	</tr>
	<?php if(!empty($this->chipinArray)) {
		foreach($this->chipinArray as $chipin):
	?>
	<tr>
		<td height="25"><?php echo $chipin['UID']?></td>
		<td height="25"><?php echo $chipin['username']?></td>
		<td height="25">
		<?php
			echo 'TeamID：'.$chipin['TeamID'].'下注额：'.$chipin['ChipInScore'];
		?></td>
		<td height="25"><?php echo $chipin['GetScore']?></td>
		<td height="25">
		<?php
			$print_str = '';
			switch ($chipin['Status']) {
				case 0:
					$print_str = '未发放';
					break;
				case 1:
					$print_str = '已发放';
					break;
			}
			echo $print_str;
		?></td>
	</tr>
	<?php endforeach;?>
	<tr>
		<td colspan="5" width="100%" align="center">共 <?=$this->pageArray['pageNumber']?> 页<?php echo $this->pageString?></td>
	</tr>
	<?php }else {?>
	<tr>
		<td colspan="5" width="100%" align="center">尚未有人投注!</td>
	</tr>
	<?php }?>
	<tr>
		<td colspan="5" width="100%" align="center" style="background-color: #eee">
		<?php if($this->param['MatchStatus'] == 2) {?>
		<input onclick="window.location.href='administrator-match-grantprize?id=<?php echo $this->param['MatchID']?>'" type="button" value="发放奖励" /> OR 
		<input onclick="window.location.href='administrator-match-grantprize?id=<?php echo $this->param['MatchID']?>&sendmail=1'" type="button" value="发放奖励并发送email" />
		<?php }?>
		</td>
	</tr>
</table>

<style>
	.TableA { border-collapse:collapse;margin-top: 12px; }
	.TableA tr td { padding: 4px; }
	#admins_frame { }
</style>